using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class Stand_PositionMap : EntityTypeConfiguration<Stand_Position>
    {
        public Stand_PositionMap()
        {
            // Primary Key
            this.HasKey(t => t.Stand_Position_ID);

            // Properties
            this.Property(t => t.Stand_P)
                .HasMaxLength(100);

            this.Property(t => t.Target_Img_LR)
                .HasMaxLength(2);

            this.Property(t => t.Target_ID)
                .IsRequired()
                .HasMaxLength(10);

            this.Property(t => t.patient_id)
                .IsRequired()
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("Stand_Position");
            this.Property(t => t.Stand_Position_ID).HasColumnName("Stand_Position_ID");
            this.Property(t => t.Stand_P).HasColumnName("Stand_P");
            this.Property(t => t.Target_Img_LR).HasColumnName("Target_Img_LR");
            this.Property(t => t.Stand_ID).HasColumnName("Stand_ID");
            this.Property(t => t.Target_ID).HasColumnName("Target_ID");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.Create_Time).HasColumnName("Create_Time");
            this.Property(t => t.Update_Time).HasColumnName("Update_Time");
            this.Property(t => t.Ljsc).HasColumnName("Ljsc");
        }
    }
}
